home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_06
/
2n06065a
< prev
next >
Wrap
Text File
|
1991-01-18
|
4KB
|
126 lines
/**************************************************************************/
/* file stdwin.h */
/* description Header file for Stdwin.exe */
/**************************************************************************/
#define ANSI 0
#define TEXT 1
#define MAXFONT 10
#define MAXSIZE 20
#define ID_RED 101
#define ID_GREEN 102
#define ID_BLUE 103
#define ID_TYPEFACE 101
#define ID_SIZE 102
#define ID_EDIT 104
#define ID_LISTBOX 105
#define ID_PATH 106
#define ID_DONE 107
/* Control IDs */
#define IDM_EXIT 103
#define IDM_ABOUT 104
#define IDM_RESTART 105
#define IDM_CLEAR 205
#define IDM_SELECTFONT 306
#define IDM_CFONT 307
#define IDM_TEXTCOLOR 401
#define IDM_BACKGROUNDCOLOR 402
#define IDM_OPAQUE 403
#define IDM_TRANSPARENT 404
int PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
long FAR PASCAL StdWinWndProc(HWND, unsigned, WORD, LONG);
BOOL StdWinInit(HANDLE);
BOOL FAR PASCAL About(HWND, unsigned, WORD, LONG);
BOOL FAR PASCAL SelectFont(HWND, unsigned, WORD, LONG);
void GetSizes(HWND, int);
void GetUnderLineFont(void);
void GetBoldFont(void);
void GetItalicFont(void);
void GetFonts(HWND);
int FAR PASCAL EnumFunc(LPLOGFONT, LPTEXTMETRIC, short, LPSTR);
BOOL FAR PASCAL Colors(HWND, unsigned, WORD, LONG);
BOOL FAR PASCAL CommandLineDlg(HWND, unsigned, WORD, LONG);
BOOL FAR PASCAL CommandLineParseDlg(HWND, unsigned, WORD, LONG);
WORD Scrollup(HWND,WORD);
LOGFONT CLogFont;
int BreakSet; /* true if printf is stopped by break key */
int Redirected; /* true if printf is to be redirected */
HANDLE hOutFile; /* handle to output file */
OFSTRUCT OFStruct; /* we close & re-open file with struct */
HWND hStdWinWnd; /* handle to StdWinWndProc */
int main(void);
int getch(void);
#define SCREEN struct Screen
SCREEN{
int Char;
int xExtent;
HANDLE hFont;
COLORREF Color;
};
extern WORD LineExtents[];
extern HANDLE hInst;
HDC SetMyDC(HDC) ;
#define MAXROWS 25
#define MAXCOLUMNS 80
extern HFONT hMFont, hFont1;
extern HFONT hUnderlineFont,hBoldFont,hItalicFont;
extern char FontNameList[32][128]; /* list of added fonts */
extern int nFontIndex; /* position in FontList */
extern BYTE KeyBuffer[64],KeyHead ,KeyTail,KeyMask;
extern SCREEN ScreenBuffer[MAXROWS+2][MAXCOLUMNS]; /* storage for screen */
extern TEXTMETRIC TextMetric;
extern LOGFONT LogFont;
extern FARPROC lpCFontDlg;
extern POINT ptCurrent;
extern short nBkMode;
extern DWORD rgbBkColor;
extern DWORD rgbTextColor;
extern DWORD rgbColor;
extern short nAlignLCR;
extern short nAlignTBB;
extern FARPROC lpColors;
extern char FontList[MAXFONT][32];
extern BYTE CharSet[MAXFONT];
extern BYTE PitchAndFamily[MAXFONT];
extern int xCurrentPos,yCurrentPos;
extern int FontIndex;
extern int SizeList[MAXSIZE];
extern int SizeIndex;
extern int CurrentFont;
extern int CurrentSize;
extern short DisplayCol,DisplayLine;
extern RECT Rect; /* dimension of the client window */
extern BYTE TextBuffer[],*ptr,*ptr2;
extern char WindowTitle[];
#define ID_CANCEL 103
#define ID_OK 102
#define ID_TITLE 110
extern (*ExitCallFunc)(void);
extern int ExitCallInit;
#define BLACK RGB(0,0,0)
#define BLUE RGB(0,0,255)
#define GREEN RGB(0,255,0)
#define CYAN RGB(128,0,128)
#define RED RGB(255,0,0)
#define MAGENTA RGB(255,0,255)
#define BROWN RGB(255,255,0)
#define WHITE RGB(255,255,255)
#define DARK_GRAY RGB(128,128,128)
#define LIGHT_BLUE RGB(0,0,128)
#define LIGHT_GREEN RGB(0,128,0)
#define LIGHT_CYAN RGB(128,0,128)
#define LIGHT_RED RGB(128,0,0)
#define LIGHT_MAGENTA RGB(128,128,0)
#define YELLOW RGB(255,255,0)
#define BRIGHT_WHITE RGB(255,255,255)